//
//  CarouselControl.h
//  PropertyMananger
//
//  Created by bh on 16/12/27.
//  Copyright © 2016年 BH. All rights reserved.
//

#import <UIKit/UIKit.h>

@class CarouselControl;

@protocol CarouselDataSource <NSObject>

@required
- (NSArray *) zzcarousel:(CarouselControl *)carouselView;
- (UIView *) zzcarousel:(CarouselControl *)carouselView carouselFrame:(CGRect)frame data:(NSArray *)data viewForItemAtIndex:(NSInteger)index;

@end
@class CarouselControl;

@protocol CarouselDelegate <NSObject>

/*
 *  此方法为 用于ZZCarousel 轮播的点击方法
 */
@optional
- (void)zzcarouselView:(CarouselControl *)zzcarouselView didSelectItemAtIndex:(NSInteger)index;


@end
@interface CarouselControl : UIView

/*
 *   设置自动滚动时间
 */
@property (nonatomic, assign) CGFloat carouseScrollTimeInterval;

@property (nonatomic, weak) id <CarouselDataSource> dataSource;
@property (nonatomic, weak) id <CarouselDelegate> delegate;

@property (strong, nonatomic) NSTimer *timer;

@property (strong, nonatomic) UIScrollView *coreView;
/*
 *   重载数据
 */
-(void)reloadData;

@end
